<template>
  <el-dialog :title="type=='save'?'保存搜索条件':'另存为'" width="360px" :visible="visible" @close="closeHandle">
    <div class="p-20">
      <el-form size="small" :model="form" formInline label-position="left" label-width="50px">
        <el-form-item label="命名" prop="name">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <div class="dialog-bottom t-right">
          <ui-button size="medium" type="blue">{{type=='save'?'保存搜索条件':'另存为'}}</ui-button>
        </div>
      </el-form>
    </div>
  </el-dialog>
</template>

<script>
import {Dialog, Form, Input, FormItem} from 'element-ui'
  export default {
    components: {
      [Dialog.name]: Dialog,
      [Form.name]: Form,
      [Input.name]: Input,
      [FormItem.name]: FormItem,
    },
    props: ['visible', 'type'],
    data () {
      return {
        form: {}
      }
    },
    methods: {
      closeHandle() {
        this.$emit('update:visible', false)
      }
    },
  }
</script>

<style>

 
</style>
